Skip to content

Promisify the method startLoadingScripts#33

Open
lkazberova wants to merge 1 commit intoleozdgao:masterfrom
lkazberova:master
Open

Promisify the method startLoadingScripts#33
lkazberova wants to merge 1 commit intoleozdgao:masterfrom
lkazberova:master

Conversation

@lkazberova
Copy link

It's cool to use this method alone, as part of chain or with react-loadable, like that

Loadable.Map({
  loader: {
    Map: () => import('./Map'),
    GoogleMapApi: () => startLoadingScripts('https://maps.googleapis.com/maps/api'),
  },
  render(loaded, props) {
    let Map = loaded.Map.default;
    let GoogleMapApi = GoogleMapApi;
    return <Map {...props}/>;
  },
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant